home *** CD-ROM | disk | FTP | other *** search
- App AllWriteClickDrag
- In -
- Out AllWCD
- Type Module
- Ver 1.00d
- Max 32k
-
- Define Workspace
- Name createiconblock
- Default r1
- Prefix ci_
- `window ! Window handle
- `left ! left of box
- `bottom ! bottom of box
- `right ! right of box
- `top ! top of box
- `flags ! icon flags
- `string ! pointer to string
- `valid ! pointer to validation
- `len ! length of string
- Name basiciconblock
- Default r2
- Prefix ib_
- `left ! left of box
- `bottom ! bottom of box
- `right ! right of box
- `top ! top of box
- `flags ! icon flags
- `string ! pointer to string
- `valid ! pointer to validation
- `len ! length of string
- Name windowblock
- Default r1
- Prefix cw_
- `left ! left of VWA
- `bottom ! bottom of VWA
- `right ! right of VWA
- `top ! top of VWA
- `vwaleft ! VWA in TWA left
- `vwatop ! VWA in TWA top
- `position ! position in window stack
- `winflags ! window flags
- `cols1 ! first block of colours
- `cols2 ! second block of colours
- `twaleft ! left of TWA
- `twabottom ! bottom of TWA
- `twaright ! right of TWA
- `tawtop ! top of TWA
- `tbflags ! title bar flags
- `tbbut ! title bar button type
- `sprite ! sprite area for window
- `reserved ! reserved ?
- `title $12 title icon
- `numicons ! number of icons
- `icons ^basiciconblock
- End Workspace
-
- DEFINE MODULE
- Name AllWCD
- Help All Write/Click/Drag
- Version 1.00
- Author Justin Fletcher
- COMMANDS
- Name AllWCD
- Help ...
- The AllWCD module forces all writable icons to be of type 14
- (Write/Click/Drag) rather than type 15 (Write only). The main reason you
- may wish to do this is to force all applications to allow TextCopy to
- drag all writable icons around the desktop.|M
- For best effect, the module should have been loaded BEFORE the desktop
- has started.
- END COMMANDS
- WimpSWIs
- SWI Wimp_CreateIcon
- Pre createicon
- SWI Wimp_CreateWindow
- Pre createwindow
- End WimpSWIs
- END MODULE
-
- .createicon
- STMFD (sp)!,{r0-r5,link} ; Stack registers
- LDRW r2,`ci_flags ; get the flags
- AND r0,r2,#&F000 ; leave just button type
- CMP r0,#&F000 ; is it type 15 ?
- LDMNEFD (sp)!,{r0-r5,pc} ; Return from call if not
- BIC r2,r2,#&1000 ; clear bit 12 to leave type 14
- STRW r2,`ci_flags ; store back in block
- LDMFD (sp)!,{r0-r5,pc} ; Return from call
-
- .createwindow
- STMFD (sp)!,{r0-r5,link} ; Stack registers
- LDRW r5,`cw_numicons ; get the number of icons
- ADRW r2,`cw_icons ; pointer to icon data
- $loop
- CMP r5,#0
- BLE $exit
- LDRW r3,`ib_flags ; get the flags
- AND r0,r3,#&F000 ; leave just button type
- CMP r0,#&F000 ; is it type 15 ?
- BNE $next ; if not then go on to next icon
- BIC r3,r3,#&1000 ; clear bit 12 to leave type 14
- STRW r3,`ib_flags ; store back in block
- $next
- ADD r2,r2,#`len_basiciconblock ; increment position
- SUB r5,r5,#1 ; decrement number left
- B $loop
- $exit
- LDMFD (sp)!,{r0-r5,pc} ; Return from call
-
- # POST
- # RUN <CODE>
- # END
-
-